package cn.com.allunion.sms.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class AuthorityExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public AuthorityExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andAuthorityIdIsNull() {
            addCriterion("authorityId is null");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdIsNotNull() {
            addCriterion("authorityId is not null");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdEqualTo(String value) {
            addCriterion("authorityId =", value, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdNotEqualTo(String value) {
            addCriterion("authorityId <>", value, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdGreaterThan(String value) {
            addCriterion("authorityId >", value, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdGreaterThanOrEqualTo(String value) {
            addCriterion("authorityId >=", value, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdLessThan(String value) {
            addCriterion("authorityId <", value, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdLessThanOrEqualTo(String value) {
            addCriterion("authorityId <=", value, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdLike(String value) {
            addCriterion("authorityId like", value, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdNotLike(String value) {
            addCriterion("authorityId not like", value, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdIn(List<String> values) {
            addCriterion("authorityId in", values, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdNotIn(List<String> values) {
            addCriterion("authorityId not in", values, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdBetween(String value1, String value2) {
            addCriterion("authorityId between", value1, value2, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityIdNotBetween(String value1, String value2) {
            addCriterion("authorityId not between", value1, value2, "authorityId");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionIsNull() {
            addCriterion("authorityDescription is null");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionIsNotNull() {
            addCriterion("authorityDescription is not null");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionEqualTo(String value) {
            addCriterion("authorityDescription =", value, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionNotEqualTo(String value) {
            addCriterion("authorityDescription <>", value, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionGreaterThan(String value) {
            addCriterion("authorityDescription >", value, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionGreaterThanOrEqualTo(String value) {
            addCriterion("authorityDescription >=", value, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionLessThan(String value) {
            addCriterion("authorityDescription <", value, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionLessThanOrEqualTo(String value) {
            addCriterion("authorityDescription <=", value, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionLike(String value) {
            addCriterion("authorityDescription like", value, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionNotLike(String value) {
            addCriterion("authorityDescription not like", value, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionIn(List<String> values) {
            addCriterion("authorityDescription in", values, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionNotIn(List<String> values) {
            addCriterion("authorityDescription not in", values, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionBetween(String value1, String value2) {
            addCriterion("authorityDescription between", value1, value2, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityDescriptionNotBetween(String value1, String value2) {
            addCriterion("authorityDescription not between", value1, value2, "authorityDescription");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateIsNull() {
            addCriterion("authorityExpireDate is null");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateIsNotNull() {
            addCriterion("authorityExpireDate is not null");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateEqualTo(Date value) {
            addCriterion("authorityExpireDate =", value, "authorityExpireDate");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateNotEqualTo(Date value) {
            addCriterion("authorityExpireDate <>", value, "authorityExpireDate");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateGreaterThan(Date value) {
            addCriterion("authorityExpireDate >", value, "authorityExpireDate");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateGreaterThanOrEqualTo(Date value) {
            addCriterion("authorityExpireDate >=", value, "authorityExpireDate");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateLessThan(Date value) {
            addCriterion("authorityExpireDate <", value, "authorityExpireDate");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateLessThanOrEqualTo(Date value) {
            addCriterion("authorityExpireDate <=", value, "authorityExpireDate");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateIn(List<Date> values) {
            addCriterion("authorityExpireDate in", values, "authorityExpireDate");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateNotIn(List<Date> values) {
            addCriterion("authorityExpireDate not in", values, "authorityExpireDate");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateBetween(Date value1, Date value2) {
            addCriterion("authorityExpireDate between", value1, value2, "authorityExpireDate");
            return (Criteria) this;
        }

        public Criteria andAuthorityExpireDateNotBetween(Date value1, Date value2) {
            addCriterion("authorityExpireDate not between", value1, value2, "authorityExpireDate");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusIsNull() {
            addCriterion("authorityStatus is null");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusIsNotNull() {
            addCriterion("authorityStatus is not null");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusEqualTo(Integer value) {
            addCriterion("authorityStatus =", value, "authorityStatus");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusNotEqualTo(Integer value) {
            addCriterion("authorityStatus <>", value, "authorityStatus");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusGreaterThan(Integer value) {
            addCriterion("authorityStatus >", value, "authorityStatus");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("authorityStatus >=", value, "authorityStatus");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusLessThan(Integer value) {
            addCriterion("authorityStatus <", value, "authorityStatus");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusLessThanOrEqualTo(Integer value) {
            addCriterion("authorityStatus <=", value, "authorityStatus");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusIn(List<Integer> values) {
            addCriterion("authorityStatus in", values, "authorityStatus");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusNotIn(List<Integer> values) {
            addCriterion("authorityStatus not in", values, "authorityStatus");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusBetween(Integer value1, Integer value2) {
            addCriterion("authorityStatus between", value1, value2, "authorityStatus");
            return (Criteria) this;
        }

        public Criteria andAuthorityStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("authorityStatus not between", value1, value2, "authorityStatus");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringIsNull() {
            addCriterion("authorityString is null");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringIsNotNull() {
            addCriterion("authorityString is not null");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringEqualTo(String value) {
            addCriterion("authorityString =", value, "authorityString");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringNotEqualTo(String value) {
            addCriterion("authorityString <>", value, "authorityString");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringGreaterThan(String value) {
            addCriterion("authorityString >", value, "authorityString");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringGreaterThanOrEqualTo(String value) {
            addCriterion("authorityString >=", value, "authorityString");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringLessThan(String value) {
            addCriterion("authorityString <", value, "authorityString");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringLessThanOrEqualTo(String value) {
            addCriterion("authorityString <=", value, "authorityString");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringLike(String value) {
            addCriterion("authorityString like", value, "authorityString");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringNotLike(String value) {
            addCriterion("authorityString not like", value, "authorityString");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringIn(List<String> values) {
            addCriterion("authorityString in", values, "authorityString");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringNotIn(List<String> values) {
            addCriterion("authorityString not in", values, "authorityString");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringBetween(String value1, String value2) {
            addCriterion("authorityString between", value1, value2, "authorityString");
            return (Criteria) this;
        }

        public Criteria andAuthorityStringNotBetween(String value1, String value2) {
            addCriterion("authorityString not between", value1, value2, "authorityString");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}